remove pallet::getter from pallet-offences#6027
Conversation
6d121c6 to
b74ddc3
Compare
|
Yeah, we need you to create a new public function which does the same thing as the getter here. |
92b3ceb to
6c2895b
Compare
| >; | ||
|
|
||
| impl<T: Config> Pallet<T> { | ||
| #[deprecated(note = "Use Reports::<T>::get(id) instead.")] |
There was a problem hiding this comment.
but there is no need to deprecate here.
Just keep this public function around forever. The point is just to remove the macro code/logic, not necessarily remove this functionality.
There was a problem hiding this comment.
Ah that was my request - that was the impression that I got from the discussion on the issue, maybe I'm not up to date on the intention behind removing the getters
|
I think we can approved after you integrate our final feedback here. thanks! |
|
Please include your polkadot address in your pr description: https://github.com/paritytech/substrate-tip-bot |
|
Review required! Latest push from author must always be reviewed |
|
Alright, everything done from your feedback, I'd say. Thanks guys! |
| /// Get the offence details from reports of given ID. | ||
| pub fn reports( | ||
| report_id: ReportIdOf<T>, | ||
| ) -> Option<OffenceDetails<T::AccountId, T::IdentificationTuple>> { | ||
| Reports::<T>::get(report_id) | ||
| } | ||
|
|
There was a problem hiding this comment.
great, this is really all you need to do :)
Looking forward to seeing more contributions
|
/tip small |
|
@shawntabrizi A referendum for a small (20 DOT) tip was successfully submitted for @Zebedeusz (155YyFVoMnv9BY6qxy2i5wxtveUw7WE1n5H81fL8PZKTA1Sd on polkadot). |

Description
Part of #3326
Removes pallet::getter from pallet-offences from type
Reports.Adds a test to verify that retrieval of
Reportsstill works with storage::getter.polkadot address: 155YyFVoMnv9BY6qxy2i5wxtveUw7WE1n5H81fL8PZKTA1Sd